- dplyr was used to manipulate the data
- ggplo2 was used to create figures
- tidyr was not used since the data was already arranged to desired standards
library(dplyr) library(ggplot2)
library(dplyr) library(ggplot2)
data_1 <- read.csv("https://ndownloader.figshare.com/files/16851587")
knitr::kable(data_1)
| species | appendage | mass | cor.telson | spring.telson | deformation.telson | impulse.telson | duration.telson | cor.abdomen | spring.abdomen | deformation.abdomen | impulse.abdomen | duration.abdomen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| falcatus | smasher | 0.24 | 0.51 | 22672 | 0.22030 | 0.00259 | 0.000667 | 0.9296000 | 13946.7283 | 0.3354 | 0.00256 | 0.000850 |
| falcatus | smasher | 0.93 | 0.60 | 46270 | 0.08440 | 0.00271 | 0.000467 | 0.3561000 | 13415.4735 | 0.2578 | 0.00258 | 0.000867 |
| falcatus | smasher | 0.30 | 0.67 | 90689 | 0.21530 | 0.00218 | 0.000333 | 0.5556000 | 62978.1950 | 0.3262 | 0.00183 | 0.000400 |
| falcatus | smasher | 1.12 | 0.63 | 43735 | 0.13930 | 0.00310 | 0.000480 | 0.5953000 | 17143.4028 | 0.2985 | 0.00202 | 0.000767 |
| falcatus | smasher | 1.20 | 0.71 | 84745 | 0.10770 | 0.00266 | 0.000345 | 0.5980000 | 22672.1502 | 0.1292 | 0.00231 | 0.000667 |
| espinosus | smasher | 0.33 | 0.62 | 15166 | 0.04850 | 0.00264 | 0.000824 | 0.7121000 | 9587.2723 | 0.2794 | 0.00279 | 0.001050 |
| espinosus | smasher | 0.41 | 0.59 | 41434 | 0.03550 | 0.00262 | 0.000500 | 0.6273000 | 26217.5893 | 0.4498 | 0.00262 | 0.000622 |
| espinosus | smasher | 0.30 | 0.58 | 43297 | 0.02480 | 0.00255 | 0.000494 | 0.5381000 | 9254.4442 | 0.4340 | 0.00250 | 0.001050 |
| espinosus | smasher | 0.24 | 0.69 | 74062 | 0.04130 | 0.00283 | 0.000373 | 0.6393000 | 17559.9265 | 0.2748 | 0.00268 | 0.000800 |
| espinosus | smasher | 0.32 | 0.64 | 59066 | 0.00458 | 0.00271 | 0.000420 | 0.7109000 | 32260.4019 | 0.2538 | 0.00282 | 0.000567 |
| chiragra | smasher | 3.02 | 0.29 | 31980 | 0.13060 | 0.00205 | 0.000642 | 0.3468000 | 10753.8712 | 0.2976 | 0.00213 | 0.001010 |
| chiragra | smasher | 4.10 | 0.32 | 61286 | 0.12720 | 0.00211 | 0.000447 | 0.4174000 | 22117.7223 | 0.1802 | 0.00224 | 0.000680 |
| chiragra | smasher | 2.98 | 0.55 | 44776 | 0.03600 | 0.00242 | 0.000487 | 0.5623000 | 32451.2644 | 0.0306 | 0.00253 | 0.000560 |
| chiragra | smasher | 3.47 | 0.46 | 174764 | 0.10180 | 0.00276 | 0.000247 | 0.6167000 | 28945.4782 | 0.2550 | 0.00260 | 0.000593 |
| chiragra | smasher | 3.93 | 0.55 | 51869 | 0.11900 | 0.00248 | 0.000447 | 0.2916000 | 21421.4634 | 0.1996 | 0.00208 | 0.000747 |
| chiragra | smasher | 4.71 | 0.55 | 120822 | 0.07330 | 0.00249 | 0.000320 | 0.7286000 | 41340.3945 | 0.1006 | 0.00275 | 0.000497 |
| chiragra | smasher | 5.93 | 0.50 | 22112 | 0.21740 | 0.00239 | 0.000689 | 0.4176000 | 14175.7815 | 0.3256 | 0.00225 | 0.000853 |
| smithii | smasher | 5.36 | 0.52 | 61509 | 0.16660 | 0.00240 | 0.000618 | 0.4490000 | 30262.4151 | 0.2236 | 0.00229 | 0.000593 |
| smithii | smasher | 5.42 | 0.51 | 63510 | 0.15620 | 0.00236 | 0.000440 | 0.4827000 | 52953.0946 | 0.1562 | 0.00237 | 0.000440 |
| smithii | smasher | 6.15 | 0.47 | 66507 | 0.12220 | 0.00235 | 0.000404 | 0.5141000 | 37387.8488 | 0.1742 | 0.00238 | 0.000526 |
| smithii | smasher | 4.78 | 0.54 | 113802 | 0.08540 | 0.00238 | 0.000320 | 0.5298000 | 33535.7103 | 0.1882 | 0.00239 | 0.000553 |
| smithii | smasher | 3.89 | 0.65 | 82375 | 0.10040 | 0.00264 | 0.000353 | 0.6521000 | 44687.2065 | 0.2066 | 0.00258 | 0.000480 |
| bredeni | smasher | 1.29 | 0.63 | 90780 | 0.09860 | 0.00265 | 0.000261 | 0.6712684 | 18431.4040 | 0.3206 | 0.00264 | 0.000739 |
| bredeni | smasher | 0.52 | 0.45 | 40306 | 0.25520 | 0.00233 | 0.000500 | 0.4985725 | 8548.2869 | 0.4095 | 0.00243 | 0.000800 |
| bredeni | smasher | 0.54 | 0.54 | 22672 | 0.09990 | 0.00196 | 0.000667 | 0.6583551 | 14130.8415 | 0.1237 | 0.00210 | 0.000844 |
| bredeni | smasher | 1.09 | 0.45 | 22977 | 0.00000 | 0.00221 | 0.000662 | 0.5562426 | 11753.2427 | 0.0220 | 0.00228 | 0.000926 |
| bredeni | smasher | 0.59 | 0.62 | 46270 | 0.22120 | 0.00225 | 0.000467 | 0.4139881 | 1453.1101 | 0.8662 | 0.00211 | 0.002630 |
| festae | smasher | 0.99 | 0.56 | 26214 | 0.25320 | 0.00251 | 0.000620 | 0.6638000 | 10636.2123 | 0.4390 | 0.00271 | 0.000973 |
| festae | smasher | 0.50 | 0.57 | 44660 | 0.19440 | 0.00217 | 0.000475 | 0.6111000 | 13012.0238 | 0.3833 | 0.00233 | 0.000880 |
| festae | smasher | 1.03 | 0.33 | 12440 | 0.06520 | 0.00193 | 0.000900 | 0.3459000 | 5861.8027 | 0.0791 | 0.00232 | 0.001310 |
| festae | smasher | 0.62 | 0.45 | 21792 | 0.32620 | 0.00201 | 0.000680 | 0.3608000 | 5962.4327 | 0.4423 | 0.00199 | 0.001300 |
| festae | smasher | 1.09 | 0.61 | 32648 | 0.00000 | 0.00199 | 0.000556 | 0.4907000 | 12054.4201 | 0.2802 | 0.00201 | 0.000914 |
| festae | smasher | 0.93 | 0.52 | 36066 | 0.05860 | 0.00209 | 0.000529 | 0.5957000 | 9973.9520 | 0.0471 | 0.00220 | 0.001010 |
| festae | smasher | 0.80 | 0.80 | 111961 | 0.08240 | 0.00194 | 0.000300 | 0.5083000 | 7619.2901 | 0.1648 | 0.00224 | 0.001150 |
| festae | smasher | 0.74 | 0.46 | 40306 | 0.06660 | 0.00190 | 0.000500 | 0.4126000 | 7619.2901 | 0.0666 | 0.00199 | 0.001150 |
| festae | smasher | 1.26 | 0.76 | 251913 | 0.00000 | 0.00161 | 0.000200 | 0.4463000 | 10677.9639 | 0.0659 | 0.00202 | 0.000971 |
| oerstidii | smasher | 1.41 | 0.77 | 90689 | 0.13010 | 0.00263 | 0.000333 | 0.3184000 | 3570.1925 | 0.2394 | 0.00261 | 0.001680 |
| oerstidii | smasher | 1.81 | 0.52 | 21792 | 0.04400 | 0.00264 | 0.000680 | 0.1493000 | 822.5723 | 0.2665 | 0.00184 | 0.003500 |
| oerstidii | smasher | 2.32 | 0.36 | 4081 | 0.03130 | 0.00263 | 0.001570 | 0.6111000 | 2695.8561 | 0.5991 | 0.00162 | 0.001930 |
| oerstidii | smasher | 4.68 | 0.37 | 19438 | 0.16180 | 0.00263 | 0.000720 | 0.1522000 | 1186.4404 | 0.5553 | 0.00237 | 0.002910 |
| oerstidii | smasher | 1.84 | 0.65 | 84436 | 0.01040 | 0.00264 | 0.000345 | 0.6304000 | 33128.0060 | 0.4372 | 0.00163 | 0.000552 |
| wennerae | smasher | 2.64 | 0.56 | 26634 | 0.19360 | 0.00256 | 0.000620 | 0.6219000 | 26633.5353 | 0.3039 | 0.00263 | 0.000767 |
| wennerae | smasher | 1.06 | 0.56 | 32389 | 0.19380 | 0.00255 | 0.000564 | 0.6739000 | 32388.5114 | 0.2620 | 0.00272 | 0.000703 |
| wennerae | smasher | 3.34 | 0.57 | 23366 | 0.18690 | 0.00255 | 0.000660 | 0.6706000 | 23365.9834 | 0.2982 | 0.00268 | 0.000693 |
| wennerae | smasher | 1.15 | 0.58 | 42903 | 0.19370 | 0.00258 | 0.000493 | 0.6621000 | 42902.7567 | 0.3075 | 0.00272 | 0.000651 |
| wennerae | smasher | 2.08 | 0.52 | 16008 | 0.23020 | 0.00245 | 0.000800 | 0.6600000 | 16007.9850 | 0.3139 | 0.00268 | 0.000800 |
| wennerae | smasher | 2.82 | 0.47 | 29696 | 0.16190 | 0.00237 | 0.000593 | 0.6159000 | 29695.7429 | 0.2233 | 0.00264 | 0.000526 |
| wennerae | smasher | 2.45 | 0.51 | 26017 | 0.15630 | 0.00242 | 0.000680 | 0.7132000 | 26016.7756 | 0.1948 | 0.00279 | 0.000547 |
| wennerae | smasher | 2.25 | 0.59 | 21907 | 0.20020 | 0.00252 | 0.000680 | 0.6713000 | 21907.3896 | 0.2971 | 0.00268 | 0.000713 |
| wennerae | smasher | 4.60 | 0.40 | 18457 | 0.16600 | 0.00225 | 0.000740 | 0.6357000 | 18456.7465 | 0.2960 | 0.00264 | 0.000707 |
| wennerae | smasher | 0.47 | 0.59 | 97337 | 0.14920 | 0.00253 | 0.000352 | 0.6667000 | 97336.9995 | 0.2573 | 0.00276 | 0.000251 |
| wennerae | smasher | 0.85 | 0.76 | 163909 | 0.11450 | 0.00288 | 0.000253 | 0.7078000 | 163909.4551 | 0.2307 | 0.00282 | 0.000587 |
| wennerae | smasher | 0.60 | 0.63 | 108535 | 0.12040 | 0.00263 | 0.000319 | 0.6999000 | 108535.3346 | 0.3105 | 0.00276 | 0.000721 |
| wennerae | smasher | 1.71 | 0.51 | 36721 | 0.13870 | 0.00245 | 0.000539 | 0.6652000 | 36721.2099 | 0.1978 | 0.00271 | 0.000467 |
| wennerae | smasher | 1.44 | 0.61 | 34867 | 0.17110 | 0.00257 | 0.000547 | 0.5442000 | 34867.1764 | 0.2224 | 0.00250 | 0.000600 |
| wennerae | smasher | 1.07 | 0.67 | 118941 | 0.15120 | 0.00268 | 0.000360 | 0.7030000 | 118941.1763 | 0.2913 | 0.00275 | 0.000700 |
| wennerae | smasher | 3.35 | 0.49 | 42903 | 0.13690 | 0.00243 | 0.000493 | 0.7357000 | 42902.7567 | 0.1597 | 0.00285 | 0.000420 |
| latirostris | smasher | 1.73 | 0.65 | 19438 | 0.28590 | 0.00267 | 0.000720 | 0.5095000 | 4967.5512 | 0.5847 | 0.00242 | 0.001420 |
| latirostris | smasher | 1.04 | 0.58 | 5902 | 0.59720 | 0.00257 | 0.001310 | 0.5966000 | 763.3078 | 1.4434 | 0.00260 | 0.003630 |
| latirostris | smasher | 1.52 | 0.54 | 23961 | 0.20360 | 0.00249 | 0.000648 | 0.7113000 | 6024.0595 | 0.5551 | 0.00278 | 0.001290 |
| latirostris | smasher | 1.28 | 0.36 | 5962 | 0.32840 | 0.00223 | 0.001300 | 0.5366000 | 1915.9132 | 1.0116 | 0.00247 | 0.002290 |
| glyptocercus | smasher | 0.62 | 0.53 | 25121 | 0.24240 | 0.00250 | 0.000633 | 0.6246000 | 3406.0679 | 0.7675 | 0.00270 | 0.001720 |
| glyptocercus | smasher | 0.55 | 0.60 | 41813 | 0.20600 | 0.00256 | 0.000491 | 0.6344000 | 2976.2852 | 0.8483 | 0.00269 | 0.001840 |
| glyptocercus | smasher | 0.56 | 0.55 | 53662 | 0.16310 | 0.00253 | 0.000433 | 0.6034000 | 1790.6036 | 1.0550 | 0.00259 | 0.002370 |
| glyptocercus | smasher | 0.44 | 0.57 | 27990 | 0.23270 | 0.00254 | 0.000600 | 0.6381000 | 3903.5399 | 0.6817 | 0.00266 | 0.001610 |
| glyptocercus | smasher | 0.72 | 0.58 | 33994 | 0.19650 | 0.00255 | 0.000544 | 0.5765000 | 1882.9282 | 1.0277 | 0.00256 | 0.002310 |
| trisponosa | smasher | 0.24 | 0.65 | 16283 | 0.33970 | 0.00268 | 0.000787 | 0.4902000 | 1701.7940 | 1.0650 | 0.00243 | 0.002430 |
| trisponosa | smasher | 0.70 | 0.59 | 17143 | 0.30900 | 0.00254 | 0.000767 | 0.5571000 | 3156.6259 | 0.8038 | 0.00252 | 0.001790 |
| trisponosa | smasher | 0.42 | 0.64 | 7520 | 0.52000 | 0.00268 | 0.001160 | 0.4225000 | 644.0139 | 1.6258 | 0.00229 | 0.003960 |
| trisponosa | smasher | 0.52 | 0.51 | 9198 | 0.40480 | 0.00241 | 0.001050 | 0.5945000 | 2120.2995 | 0.9093 | 0.00259 | 0.002180 |
| trisponosa | smasher | 0.81 | 0.65 | 36828 | 0.22020 | 0.00266 | 0.000523 | 0.6232000 | 4254.9618 | 0.7230 | 0.00261 | 0.001540 |
| californiensis | intermediate | 102.16 | 0.16 | 73274 | 0.07150 | 0.00174 | 0.000371 | 0.5491000 | 24946.1284 | 0.2804 | 0.00243 | 0.000636 |
| californiensis | intermediate | 73.46 | 0.21 | 45230 | 0.10310 | 0.00191 | 0.000472 | 0.2782000 | 59943.5526 | 0.1758 | 0.00194 | 0.000410 |
| californiensis | intermediate | 24.33 | 0.19 | 14986 | 0.14960 | 0.00190 | 0.000820 | 0.2004000 | 12440.1373 | 0.2484 | 0.00193 | 0.000900 |
| californiensis | intermediate | 29.15 | 0.12 | 17029 | 0.24130 | 0.00180 | 0.000769 | 0.3500000 | 19082.6952 | 1.5257 | 0.00211 | 0.000727 |
| californiensis | intermediate | 105.89 | 0.09 | 72296 | 0.06780 | 0.00165 | 0.000373 | 0.6226000 | 23132.4867 | 0.2802 | 0.00246 | 0.000660 |
| maculata | spearer | 126.19 | 0.30 | 38879 | 0.16180 | 0.00200 | 0.000509 | 0.4797000 | 627.8778 | 1.2317 | 0.00223 | 0.004010 |
| maculata | spearer | 192.32 | 0.37 | 32911 | 0.21450 | 0.00229 | 0.000553 | 0.4279000 | 1382.2375 | 0.9171 | 0.00238 | 0.002700 |
| maculata | spearer | 36.52 | 0.55 | 29767 | 0.25240 | 0.00244 | 0.000582 | 0.4625000 | 607.3098 | 1.4968 | 0.00230 | 0.004070 |
| maculata | spearer | 60.81 | 0.47 | 25121 | 0.26980 | 0.00245 | 0.000633 | 0.3431000 | 959.8871 | 1.1287 | 0.00222 | 0.003240 |
| ciliata | spearer | 3.30 | 0.66 | 27990 | 0.22410 | 0.00265 | 0.000600 | 0.4941000 | 18002.5896 | 0.3014 | 0.00235 | 0.000748 |
| ciliata | spearer | 3.82 | 0.57 | 21371 | 0.27860 | 0.00250 | 0.000687 | 0.7070000 | 23606.9869 | 0.2706 | 0.00273 | 0.000653 |
| ciliata | spearer | 3.75 | 0.67 | 34556 | 0.16720 | 0.00258 | 0.000540 | 0.2295000 | 19802.7340 | 0.2584 | 0.00239 | 0.000713 |
| ciliata | spearer | 3.78 | 0.58 | 31380 | 0.21500 | 0.00264 | 0.000567 | 0.5023000 | 13624.2715 | 0.3134 | 0.00250 | 0.000860 |
| ciliata | spearer | 4.64 | 0.63 | 83847 | 0.09890 | 0.00270 | 0.000347 | 0.5670000 | 9117.4144 | 0.3006 | 0.00194 | 0.001050 |
| empusa | spearer | 9.16 | 0.23 | 34832 | 0.16340 | 0.00176 | 0.000547 | 0.1277000 | 1777.3562 | 0.2655 | 0.00169 | 0.002730 |
| empusa | spearer | 11.23 | 0.37 | 4928 | 0.20420 | 0.00207 | 0.001700 | 0.2900000 | 6056.7640 | 0.3320 | 0.00193 | 0.001310 |
| empusa | spearer | 7.61 | 0.36 | 41263 | 0.13850 | 0.00214 | 0.000545 | 0.5100000 | 15877.2868 | 0.2723 | 0.00227 | 0.000800 |
| empusa | spearer | 8.19 | 0.38 | 40130 | 0.20410 | 0.00217 | 0.000606 | 0.6800000 | 4965.3989 | 0.6025 | 0.00257 | 0.001430 |
| empusa | spearer | 9.54 | 0.32 | 13338 | 0.22890 | 0.00197 | 0.000887 | 0.5800000 | 26217.5893 | 0.2531 | 0.00240 | 0.000622 |
Mantis Shrimp Shells
data_1_modified <- mutate(data_1, ratio = (cor.telson/cor.abdomen)) big_shrimps <- data_1_modified %>% group_by(species) %>% filter(mass > 15) small_shrimps <- data_1_modified %>% group_by(species) %>% filter(mass < 15)
The figures created use mass on the x axis and the ratio of COR between the telson and the abdomen.
Geom_point and geom_smooth are used to create points and a trend line, the axis are then scaled to the minimum and maximum mass and ratio values for the small and big categories.
Then, facet_wrap is used to seaparate the graphs by species.
The purpose of this manipulation was to determine if there was a relationship between mass and ratio of COR telson vs abdomen across different species of mantis shrimp.